Skip to content

fix(aws-strands): lower Python floor to 3.10 - #2285

Merged
contextablemark merged 1 commit into
ag-ui-protocol:mainfrom
Vishal0203:fix/aws-strands-python-310
Aug 4, 2026
Merged

fix(aws-strands): lower Python floor to 3.10#2285
contextablemark merged 1 commit into
ag-ui-protocol:mainfrom
Vishal0203:fix/aws-strands-python-310

Conversation

@Vishal0203

Copy link
Copy Markdown
Contributor

Fixes #2282

Problem

ag_ui_strands declares requires-python = ">=3.12, <3.14", which blocks environments pinned to Python 3.10. As reported in #2282, users currently have to patch the package locally to install it.

Notably the package README has advertised - Python 3.10+ under Prerequisites since the integration first landed in #675 — the same commit that set the floor to >=3.12. So the documented contract and the enforced metadata have disagreed from the start; this PR makes the metadata match the promise.

Why 3.10 is safe

Nothing in the adapter needs 3.11+:

  • Syntax: every file under src/, tests/, and examples/ parses with ast.parse(..., feature_version=(3, 10)). The only modern constructs are PEP 604 unions (X | None), which are 3.10+ at runtime. No match statements, StrEnum, TaskGroup, ExceptionGroup/except*, itertools.batched, typing.Self, @override, datetime.UTC, or tomllib.
  • Dependencies: all of them already support 3.10 — strands-agents is >=3.10 (classified 3.10–3.13), ag-ui-a2ui-toolkit is >=3.10,<3.15, ag-ui-protocol is >=3.9. Sibling integrations in this repo are already on 3.10 (langgraph, adk-middleware, agent-spec, langroid, crew-ai), so aws-strands was the outlier.

Changes

  • pyproject.tomlrequires-python = ">=3.10, <3.14"
  • examples/pyproject.tomlpython = "<3.14,>=3.10"
  • examples/README.md — supported range now reads 3.10 – 3.13
  • uv.lock — regenerated; adds 3.10 backports (exceptiongroup, tomli, backports-asyncio-runner) behind python_full_version < '3.11' markers

One incidental fix: regenerating the lock also moves ag-ui-a2ui-toolkit 0.0.3 → 0.0.4. The committed pyproject.toml already required >=0.0.4 while the lock still pinned 0.0.3, so uv lock --check was failing on main before this PR. Happy to split that out if you'd prefer it separate.

The upper bound <3.14 is unchanged — this only lowers the floor.

Verification (CPython 3.10.20)

  • uv sync --python 3.10 --frozen --all-groups — resolves and installs
  • import ag_ui_strands — all 20 public exports load
  • pytest tests/176 passed, 2 skipped
  • poetry install in examples/ on a 3.10 interpreter, then import server.__main__ — OK
  • uv build — built wheel reports Requires-Python: <3.14,>=3.10

No CI changes needed: no workflow pins a Python version for this package, and build-python-preview only runs uv build.

The ag_ui_strands package required Python >=3.12, which blocked users
whose environments are pinned to 3.10 and forced them to patch the
package locally. Nothing in the adapter actually needs 3.11+ syntax or
stdlib: the only modern constructs are PEP 604 unions (3.10+), and every
dependency already supports 3.10 (strands-agents >=3.10,
ag-ui-a2ui-toolkit >=3.10, ag-ui-protocol >=3.9).

The package README already advertised "Python 3.10+", so this also
resolves that inconsistency.

- pyproject.toml: requires-python = ">=3.10, <3.14"
- examples/pyproject.toml: python = "<3.14,>=3.10"
- examples/README.md: state the supported range as 3.10 - 3.13
- uv.lock: regenerate; adds the 3.10 backports (exceptiongroup, tomli,
  backports-asyncio-runner) behind python_full_version markers

Regenerating the lock also picks up ag-ui-a2ui-toolkit 0.0.4, which the
committed pyproject already required but the lock still pinned at 0.0.3.

Verified on CPython 3.10.20: uv sync --frozen resolves and installs, the
package imports, the full test suite passes (176 passed, 2 skipped), the
example server imports, and the built wheel reports
Requires-Python: <3.14,>=3.10.

Fixes ag-ui-protocol#2282
@Vishal0203

Copy link
Copy Markdown
Contributor Author

Hi @ranst91 , sorry for the tag. Would appreciate a review. This will unblock us!

@aviau

aviau commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Is there even still a reason for <3.14 ?

@Vishal0203

Copy link
Copy Markdown
Contributor Author

haven't checked for versions above 3.14, but the library builds and runs fine for 3.10.

@Vishal0203

Copy link
Copy Markdown
Contributor Author

@contextablemark Sorry for the tag! requesting review to unblock myself 🙇🏼

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1785367292 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then install the packages you need:

# Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1785367292' --index testpypi

# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1785367292' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1785367292' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1785367292' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1785367292' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1785367292' --index testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1785367292

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: 38c2e3a

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@2285

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@2285

@ag-ui/event-throttle-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/event-throttle-middleware@2285

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@2285

@ag-ui/mcp-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-middleware@2285

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@2285

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@2285

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@2285

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@2285

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@2285

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@2285

@ag-ui/claude-managed-agents

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-managed-agents@2285

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@2285

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@2285

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@2285

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@2285

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@2285

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@2285

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@2285

@ag-ui/watsonx

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/watsonx@2285

@ag-ui/a2ui-toolkit

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-toolkit@2285

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@2285

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@2285

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@2285

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@2285

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@2285

commit: 80de956

@contextablemark contextablemark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. merging.

@contextablemark
contextablemark merged commit 843e8b9 into ag-ui-protocol:main Aug 4, 2026
42 checks passed
aviau added a commit to aviau/ag-ui that referenced this pull request Aug 4, 2026
ag_ui_strands declares requires-python = ">=3.12, <3.14", which blocks
Python 3.14 even though nothing in the package or its dependency tree
needs the cap. All direct dependencies already support 3.14
(strands-agents, ag-ui-protocol, fastapi have no upper bound;
ag-ui-a2ui-toolkit is <3.15).

Verified on CPython 3.14.6:
- uv sync --python 3.14 --all-groups resolves and installs cleanly
- import ag_ui_strands loads all 20 public exports
- pytest tests/ - 176 passed, 2 skipped (same counts as the 3.10 floor
  verification in ag-ui-protocol#2285)
- poetry install in examples/ on 3.14 resolves and installs; the demo
  server module imports fully (only fails at model-construction time
  on a missing API key, unrelated to Python version)
- uv build - wheel reports Requires-Python: <3.15,>=3.12
@aviau

aviau commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

I have rebased #2293

aviau added a commit to aviau/ag-ui that referenced this pull request Aug 4, 2026
ag_ui_strands declares requires-python = ">=3.10, <3.14", which blocks
Python 3.14 even though nothing in the package or its dependency tree
needs the cap. All direct dependencies already support 3.14
(strands-agents, ag-ui-protocol, fastapi have no upper bound;
ag-ui-a2ui-toolkit is <3.15).

Verified on CPython 3.14.6:
- uv sync --python 3.14 --all-groups resolves and installs cleanly
- import ag_ui_strands loads all 20 public exports
- pytest tests/ - 176 passed, 2 skipped (same counts as the 3.10 floor
  verification in ag-ui-protocol#2285)
- poetry install in examples/ on 3.14 resolves and installs; the demo
  server module imports fully (only fails at model-construction time
  on a missing API key, unrelated to Python version)
- uv build - wheel reports Requires-Python: <3.15,>=3.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Extend support for Python 3.10 for aws-strands integration

3 participants